package vista.ventanaEstadoTarea;

import java.awt.event.ActionEvent;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

import javax.swing.JTextField;

/**
 * @author Cristian
 * extiende de ButtonAction.
 * */
public class BotonAbrirInformacion extends ButtonAction{

	//Constructor *********************************************************** //
	public BotonAbrirInformacion(VentanaTarea modelo){
		super(modelo);
	}
	
	public void actionPerformed(ActionEvent arg0) {
		try {
			BufferedReader bf = new BufferedReader(new FileReader(this.getArchivo()));
			try {
				while (bf.readLine()!=null) {
					JTextField texto = new JTextField();
					texto.setText(bf.toString());
					new VentanaInformacionEstado(texto);
					}
			} catch (IOException e) {
				e.printStackTrace();
			} 
			
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} 



		
	}

}
